<%-- 
    Document   : add_pendidikan
    Created on : Jan 14, 2014, 10:42:32 PM
    Author     : Muhammad Dony
--%>
<%@include file="../header_user.jsp" %>
        <ul class="nav nav-tabs">
            <li><a href="./identitas">Identitas</a></li>
            <li><a href="./pendidikan">Riwayat Pendidikan</a></li>
            <li><a href="./organisasi">Riwayat Organisasi</a></li>
            <li><a href="./panitia">Riwayat Kepanitian</a></li>
            <li><a href="./prestasi">Prestasi</a></li>
            <li><a href="./keahlian">Keahlian</a></li>
        </ul>
<%@page import="java.util.List"%>
<%@page import="data.PendidikanData"%>
<%
    PendidikanData dataPendidikan = (PendidikanData) request.getAttribute("dataPendidikan");
    String action = (String) request.getAttribute("buttonName");
%>
        <div class="col-lg-10">
            <div class="row">
                <div class="col-lg-3 col-lg-offset-6 well margin-atas">
                    <form class="form-horizontal col-lg-12 text-center" action="pendidikan" role="form" method="POST" parsley-validate>
                        <div class="form-group">
                            <h2>Riwayat Pendidikan</h2>
                            <div class="controls">
                                <input class="form-control" type="hidden" name="no" parsley-trigger="change" value="<% if(action.equals("Edit")){ out.print(dataPendidikan.getNomor()); }%>" />
                            </div>
                            <div class="controls">
                                <label>ID</label>
                                <input class="form-control" type="text" placeholder="Username" name="ID" parsley-trigger="change" value="<%=user.getID()%>" readonly />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Institusi</label>
                                <input class="form-control" type="text" name="institusi" placeholder="Institusi" value="<% if(action.equals("Edit")){ out.print(dataPendidikan.getInstitusi()); }%>">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Jurusan</label>
                                <input class="form-control" type="text" name="jurusan" placeholder="Jurusan" value="<% if(action.equals("Edit")){ out.print(dataPendidikan.getJurusan()); }%>">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="controls">
                                <label>Tahun Masuk</label>
                                <select name="masuk" id="masuk" class="form-control">
                                <% for(int t = 1990; t<=2015; t++){
                                    String a = String.valueOf(t);
                                 %>   
                                 <option value=<%=a%> <% if(action.equals("Edit") && a.equals(dataPendidikan.getMasuk())){out.print("selected");} %>> <%=a%> </option>
                                <%}%>
                                </select>
                                
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="controls">
                                <label>Tahun Lulus</label>
                                <select name="tamat" id="tamat" class="form-control">
                                <% for(int t = 1990; t<=2015; t++){
                                    String a = String.valueOf(t);
                                 %>   
                                 <option value=<%=a%> <% if(action.equals("Edit") && a.equals(dataPendidikan.getTamat())){out.print("selected");} %>> <%=a%> </option>
                                <%}%>
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="controls">
                                <input type="submit" class="btn btn-primary form-control" name="action" value="<%=action%>">
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
<%@include file="../footer_user.jsp" %>